using FluentNHibernate.Mapping;

namespace TaskKernel.Domain.Nhibernate.Mappings
{
    public class WorkingPeriodMap : ClassMap<WorkingPeriod>
    {
        public WorkingPeriodMap()
        {
            Table("task_WorkingPeriods");
            Id(x => x.UID, "GID").GeneratedBy.GuidNative();
            Map(x => x.StartTime).Column("DateStart");
            Map(x => x.StopTime).Column("DateStop");
            References(x => x.Owner, "AccountGID");
            References(x => x.Task).Column("TaskGID");
        }
    }
}